<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<script type="text/javascript"
	src='<c:url value="/resources/js/jquery-ui-1.8.16.custom.min.js"/>'></script>
<link rel="stylesheet"
	href='<c:url value="/resources/css/redmond/jquery-ui-1.8.16.custom.css"/>' />
<script type="text/javascript"
	src='<c:url value="/resources/js/jquery.ui.datepicker-zh-CN.js"/>'></script>
<script type="text/javascript"
	src='<c:url value="/resources/js/fund/summary.js"/>'></script>

<fieldset>
	<legend>经费统计</legend>
	<div>
	
		<fieldset>
			<legend>总体汇总</legend>
			<table>
				<tbody>
				<tr>
					<th>项目</th>
					<th>金额</th>
				</tr>
				<tr>
					<td>经费支出总计</td>
					<td>${totalFundOutcome }</td>
				</tr>
				<tr>
					<td>拨款支出总计</td>
					<td>${totalAppropriationOutcome }</td>
				</tr>
				</tbody>
			</table>
		</fieldset>
		
		<fieldset>
			<legend>经费支出分类统计</legend>
			<table>
				<tbody>
				<tr>
					<th>支出分类</th>
					<th>支出金额</th>
				</tr>
				
				<c:forEach items="${fundOutcomeSummaryList }" var="fundOutcomeSummary"
				varStatus="status">
					<c:if test="${status.count%2==0}">
						<tr id="row_${application.id}" class="odd">
					</c:if>
					<c:if test="${status.count%2!=0}">
						<tr id="row_${application.id}">
					</c:if>
					<td>${fundOutcomeSummary.catagoryName }</td>
					<td>${fundOutcomeSummary.totalAmount }</td>
					</tr>
				</c:forEach>
				
				</tbody>
			</table>
		</fieldset>

		
		<form action="" id="summarySearchForm">
			<fieldset>
				<legend>按时间段统计经费支出</legend>
				<table class="nostyle">
					<tbody>
						<tr>
							<td><label>时间:</label></td>
							<td><input type="text" id="from1" name="from" class="text-long" /></td>
							<td><label>至</label><input type="text" id="to1" name="to" class="text-long" /></td>
							<td><input type="button" id="searchSummaryBtn" value="查询" /></td>
						</tr>
					</tbody>
				</table>
				<div id="summarySearchResult"></div>
			</fieldset>
		</form>
	</div>
</fieldset>